home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5446 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: mail2news.demon.co.uk!ues5.cern.ch
  2. From: Dan Pop <Dan.Pop@cern.ch>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: What the heck is ...?
  5. Date: Mon, 12 Feb 1996 14:19:43 +0100
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <9602121319.AA28863@ues5.cern.ch>
  8. References: <sconi-1102961642580001@ip-24.newportnet.net> <311eb63e.1004560@usenet.interramp.com>
  9. X-NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11. X-Mail2News-Path: mail1.cern.ch!ues5.cern.ch
  12.  
  13. tandemino@interramp.com (Joe Peterson) writes:
  14.  
  15. >The elipsis indicates that the function has a variable number of
  16. >arguments from that position on.  The compiler merely pushes the
  17. >actual parameters onto the stack.
  18.  
  19. It does more than this.  The arguments suffer the default argument 
  20. promotions before being passed to the function.  OTOH, it is your
  21. responsibilty to cast NULL (or 0) to the appropriate pointer type when
  22. the corresponding argument is part of the variable argument list.
  23.  
  24. >It is the responsibility of the
  25. >called function to parse those values on the stack, using the
  26. >'varargs' constructs.
  27.  
  28. The 'varargs' constructs are obsolete.  The standard method is to use the
  29. macros defined in <stdarg.h>.
  30.  
  31. Dan
  32. -- 
  33. Dan Pop
  34. CERN, CN Division
  35. Email: danpop@mail.cern.ch 
  36. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  37.